/**
 * Copyright (C) 2009+ Spark Zheng
 *
 * @file        src/pipeline.h 
 * @date        2010-03-25
 * @brief	general_datastream
 * @see         dserver
 * @history
 */

#ifndef _DSERVER_PIPELINE_H
#define _DSERVER_PIPELINE_H

#ifdef __cplusplus
extern "C" {
#endif

#include <dlib/global.h>
#include <dlib/bit.h>
#include <dlib/lock.h>
#include <dlib/list.h>
#include <dlib/threadpool.h>

#include "dserver.h"
#include "filt_types.h"

/** the limited value of pipeline_id */
#define MAX_PIPELINE_ID		4096

struct pipeline_context {
	uint16_t	p_nr;		/** pipeline number */
	uint16_t	p_max_id;	/** pipeline max id */
	pipeline_node_t	*p_nodes;	/** pipeline list */
	//dlib_lock_t	p_lock;
};

/**
 * pipeline_init
 * @brief pipeline module construct
 * @param dc: main context struct
 */
extern int pipeline_init(dserver_t *dc);

/**
 * pipeline_init
 * @brief pipeline module destruct
 * @param dc: main context struct
 */
extern void pipeline_exit(dserver_t *dc);

#ifdef __cplusplus
}
#endif
#endif
